<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
    <style type="text/css">
        .trstyle0{ background-color: #e8e8e8; }
    </style>
</head>

<body oncontextmenu="self.event.returnValue=false" ondragstart="return false" class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>顾客列表<small><a target="_blank"></a></small></h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li class="active">顾客列表</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">列表</h3>
                        <div class="box-tools">
                            <form action="/Customer/clist/" method="GET" role="form">
                                <div class="input-group input-group-sm" style="width: 450px;">
                                    
                                    <input type="text" name="name" class="form-control pull-right" style="width:150px; float: right;" placeholder="Search" value="{$Think.get.name}">
                                    <select name="key" id="keyinput" class="form-control" required="required" style="width:100px; float: right;">
                                        <option value="name">姓名</option>
                                        <option value="company">公司名称</option>
                                        <option value="mobile">电话</option>
                                    </select>
                                    <div class="input-group-btn">
                                        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                                    </div>
                                    <script type="text/javascript">$('#keyinput').val('{$Think.get.key}');</script>
                                </div>
                            </form>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered HjTable" border="1">
                            <tbody>
                                <tr style="background-color: #E6E6FA;">
                                    <th style="width: 5%;">序号</th>
                                    <th style="width: 10%;">所属门店</th>
                                    <th style="width: 16%;">公司名称</th>
                                    <th style="width: 10%;">顾客名称</th>
                                    <!-- <th style="width: 10%;">英文名称</th> -->
                                    <th style="width: 16%;">二维码</th>
                                    <th style="width: 15%;">创建时间</th>
                                    <th style="width: 15%;">支付二维码</th>
                                    <th style="width: 8%;">公司简介</th>
                                    <th style="width: 8%"><a class="btn btn-success" href="/Customer/clist/opt/add" role="button">新增</a></th>
                                </tr>

                                <notempty name="list">
                                    <volist name="list" id="vo">
                                        <tr class='trstyle{$vo.status}'> <!--class='trstyle{$vo.status}' -->
                                            <td>{$vo.cid}</td>
                                            <td><img src='{$vo.Avatar}' width='72' /></td>
                                            <td>{$vo.company}</td>
                                            <td>{$vo.name}</td>
                                            <!-- <td>{$vo.name_en}</td> -->
                                            <td><img title="如果图片无法下载，请刷新页面。" width="180" src="{$vo.qrcode}"></td>
                                          <!--   <td><eq name="vo.status" value="1">
                                                    <span class="label label-success">正常</span>
                                                <else/>
                                                    <span class="label label-warning">禁用</span>
                                                </eq>
                                            </td> -->
                                            <td>{$vo.ctime}</td>

                                            <td><eq name="vo.pay_two_code" value="">
                                                <label title="支付二维码" for="inputImage" class="btn btn-info">
                                                    <i class="fa fa-upload"></i>
                                                    <a href="/Customer/uploadTwoCode/opt/up/cid/{$vo.cid}" style="color: #fff;">支付二维码</a> 
                                                </label>
                                            <else /><img src='{$vo.pay_two_code}' width='92' /></eq></td>

                                            <td><a class="btn btn-info" href="/Customer/clist/cid/{$vo.cid}/opt/introduction" role="button">查看</a></td>
                                            <td><a class="btn btn-info" href="/Customer/clist/cid/{$vo.cid}/opt/edit" role="button">详细</a>
                                            <br/><br/>
                                            <a class="btn btn-danger" onclick="if(confirm('确认删除')){return true}else{return false}"  href="/Customer/clist/cid/{$vo.cid}/opt/delete" role="button">删除</a>
                                            </td>
                                        </tr>
                                    </volist>
                                <else />
                                     <tr class='trstyle{$vo.status}'>
                                            <td colspan="9">没有找到相关记录</td>
                                    </tr>
                                </notempty>
                                
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer clearfix">
                        <ul class="pagination pagination-sm no-margin pull-right">
                            {$show}
                        </ul>
                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />
    <script type="text/javascript">
    $("#CustomerManager").addClass("active");
    $("#customer_list").addClass("active");
    
   /* function deleteData($uid){
        if (confirm("确定删除?")){
            location.href = "/Customer/clist/cid/"+$uid+"/opt/delete";
        }
    }*/
    </script>
</body>

</html>
